# -*- coding: utf-8 -*
'''
    Created by XiaoInk at 2021/10/08 22:02:36
    Gitee: https://gitee.com/XiaoInk
'''

import os

from enum import IntEnum


class _ResponseStatus(IntEnum):
    '''响应状态码'''
    StatusOK = 200
    StatusCreated = 201
    StatusBadRequest = 400
    StatusUnauthorized = 401
    StatusForbidden = 403
    StatusNotFound = 404
    StatusInternalServerError = 500


class _CMS:
    ROOT = os.path.dirname(os.path.abspath(__file__))
    FileUploadDir = os.path.join(ROOT, 'data/upload')
    FileDownloadDir = os.path.join(ROOT, 'data/download')

    os.makedirs(FileUploadDir, exist_ok=True)
    os.makedirs(FileDownloadDir, exist_ok=True)


class _Macros:
    HTTP = _ResponseStatus
    CMS = _CMS


macros = _Macros

if __name__ == '__main__':
    pass
